<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Gift excursion</title>
</h:head>

<h:body onload="#{GiftManaged.searchById()}">
<h:form>
	<p:panelGrid columns="2">
			<p:outputLabel value = "Name:"/>
			<h:outputText value="#{GiftManaged.eDTO.name}"/>
			<p:outputLabel value = "Date:"/>
			<h:outputText value="#{GiftManaged.eDTO.date}">
				<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
		    </h:outputText>
			<p:outputLabel value = "Available Place:"/>
			<h:outputText value="#{GiftManaged.eDTO.availablePlaces}"/>
			<p:outputLabel value = "Description:"/>
			<h:outputText value="#{GiftManaged.eDTO.description}"/>
			<p:outputLabel value = "Duration:"/>
			<h:outputText value="#{GiftManaged.eDTO.duration}"/>
			<p:outputLabel value = "Type:"/>
			<h:outputText value="#{GiftManaged.eDTO.type}"/>
			<p:outputLabel value = "City:"/>
			<h:outputText value="#{GiftManaged.eDTO.city}"/>
			<p:outputLabel value = "Price:"/>
			<h:outputText value="#{GiftManaged.eDTO.price}"/>
		</p:panelGrid>
	<p:commandButton id="excursion" value="Confirm" action="#{GiftManaged.giftExcursion()}"  ajax="false" />
	<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" /> 
	</h:form>
</h:body>
</html>